//
//  OMPaySuccessInfoTableCell.m
//  OMENGO_NEW
//
//  Created by 梁尚嘉 on 2017/5/12.
//  Copyright © 2017年 Kamfat. All rights reserved.
//

#import "OMPaySuccessInfoTableCell.h"
#import "OMOrder.h"
@interface OMPaySuccessInfoTableCell ()
@property (nonatomic, strong) UILabel *payPriceLabel;
@property (nonatomic, strong) UILabel *payPriceDetailLabel;
@property (nonatomic, strong) UILabel *paymentMethodLabel;
@property (nonatomic, strong) UILabel *paymentMethodDetailLabel;
@property (nonatomic, strong) UILabel *statusLabel;
@end

@implementation OMPaySuccessInfoTableCell

- (void)configureCellWithObj:(OMOrder *)order
{
    self.payPriceDetailLabel.text = [@"￥"stringByAppendingString:order.amount?:@"0"];
    self.paymentMethodDetailLabel.text = order.paymentMethodName;
}


- (void)configure
{
    [super configure];
    _payPriceLabel = [UILabel new];
    _payPriceLabel.text = @"支付金额";
    _payPriceLabel.font = SM_CFont(30);
    _payPriceLabel.textColor = HEXCOLOR(@"9f9f9f");
    [self.containView addSubview:_payPriceLabel];
    [_payPriceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(SM_SIZE(40)));
        make.top.equalTo(@(SM_SIZE(40)));
    }];

    _payPriceDetailLabel = [UILabel new];
    _payPriceDetailLabel.text = @"￥24.00";
    _payPriceDetailLabel.font = SM_NFont(30);
    _payPriceDetailLabel.textColor = SM_redColor;
    [self.containView addSubview:_payPriceDetailLabel];
    [_payPriceDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.payPriceLabel.mas_right).offset(SM_SIZE(35));
        make.top.equalTo(self.payPriceLabel.mas_top);
    }];

    _paymentMethodLabel = [UILabel new];
    _paymentMethodLabel.text = @"支付方式";
    _paymentMethodLabel.font = SM_CFont(30);
    _paymentMethodLabel.textColor = HEXCOLOR(@"9f9f9f");
    [self.containView addSubview:_paymentMethodLabel];
    [_paymentMethodLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.payPriceLabel.mas_left);
        make.top.equalTo(self.payPriceLabel.mas_bottom).offset(SM_SIZE(20));
    }];

    _paymentMethodDetailLabel = [UILabel new];
    _paymentMethodDetailLabel.text = @"在线支付";
    _paymentMethodDetailLabel.font = SM_CFont(30);
    _paymentMethodDetailLabel.textColor = SM_blackColor;
    [self.containView addSubview:_paymentMethodDetailLabel];
    [_paymentMethodDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_paymentMethodLabel.mas_right).offset(SM_SIZE(35));
        make.top.equalTo(_paymentMethodLabel.mas_top);
        make.bottom.equalTo(@(SM_SIZE(-40)));
    }];

//    _statusLabel = [UILabel new];
//    _statusLabel.font = SM_CFont(28);
//    _statusLabel.textColor = SM_thumeColor;
//    _statusLabel.text = @"商家正在为您配货中";
//    [self.containView addSubview:_statusLabel];
//    [_statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.centerX.equalTo(self.containView.mas_centerX);
//        make.top.equalTo(self.paymentMethodLabel.mas_bottom).offset(SM_SIZE(30));
//        make.bottom.equalTo(@(SM_SIZE(-50)));
//    }];
}


@end
